#ifndef WIFI_APP_TASK_H
#define WIFI_APP_TASK_H

#include "esp_err.h"

#define EV_WIFI_CONNECTED_BIT           (1<<0)
#define EV_WIFI_DISCONNECTED_BIT        (1<<1)

//WIFI MANAGER相关事件
typedef enum {
    WIFI_EV_READY,              //WIFI MANAGER初始化完成
    WIFI_EV_CONNECT_SUCCESS,    //获取IP成功
    WIFI_EV_SNTP,               //EVSNTP联网成功
    WIFI_EV_CONNECT_TIMEOUT,    //连接超时
    WIFI_EV_DISCONNECTED,       //断开连接
    WIFI_EV_MAX,
} wifi_ev_t;

typedef void (*wifi_event_cb)(wifi_ev_t);

//WIFI相关事件回调函数
typedef void (*wifi_manager_callback)(wifi_ev_t ev, void *data);


esp_err_t wifi_app_task_init(void);
void wifi_manager_set_ssid(char *ssid, char *password);

#endif // WIFI_APP_TASK_H